home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / muds / pennmush.000 / pennmush-1.50-p8-linux.tar / pennmush / config.h < prev    next >
C/C++ Source or Header  |  1993-04-10  |  5KB  |  206 lines

  1. /* config.h */
  2.  
  3. #ifndef __CONFIG_H
  4. #define __CONFIG_H
  5.  
  6. #include "version.h"
  7. #include "copyright.h"
  8. #include "options.h"
  9.  
  10.  
  11. /*----- Miscellaneous other stuff -----*/
  12.  
  13. #define God(x)  ((x) == GOD)
  14.  
  15. /* limit on player name length */
  16. #define PLAYER_NAME_LIMIT 16
  17.  
  18. /* magic cookies */
  19. #define LOOKUP_TOKEN '*'
  20. #define NUMBER_TOKEN '#'
  21. #define ARG_DELIMITER '='
  22.  
  23. /* magic command cookies */
  24. #define SAY_TOKEN '"'
  25. #define POSE_TOKEN ':'
  26. #define SEMI_POSE_TOKEN ';'
  27. #define CHAT_TOKEN '+'
  28.  
  29. /* delimiter for lists of exit aliases */
  30. #define EXIT_DELIMITER ';'
  31.  
  32. #define OBJECT_ENDOWMENT(cost) (((cost)-5)/5)
  33.  
  34. /* !!! added for recycling, return value of object */
  35. #ifdef DESTROY
  36. #define OBJECT_DEPOSIT(pennies) ((pennies)*5+5)
  37. #endif /* DESTROY */
  38.  
  39. #define QUIT_COMMAND "QUIT"
  40. #define WHO_COMMAND "WHO"
  41. #define LOGOUT_COMMAND "LOGOUT"
  42.  
  43. #ifdef AT_DOING
  44. #define DOING_COMMAND "DOING"
  45. #endif
  46.  
  47. #ifdef RWHO_SEND
  48. #ifdef FULL_RWHO
  49. #define RWHO_COMMAND "RWHO"
  50. #endif 
  51. #endif
  52.  
  53. #define PREFIX_COMMAND "OUTPUTPREFIX"
  54. #define SUFFIX_COMMAND "OUTPUTSUFFIX"
  55.  
  56. /*----- interface.c stuff -----*/
  57.  
  58. #ifdef XENIX
  59. #define MAX_INPUT 4096        /* only used in xenix.c */
  60. #endif
  61. #define MAX_OUTPUT 16384
  62. #define COMMAND_TIME_MSEC 1000    /* time slice length in milliseconds */
  63. #define COMMAND_BURST_SIZE 100    /* commands allowed per user in a burst */
  64. #define COMMANDS_PER_TIME 1    /* commands per time slice after burst */
  65.  
  66. #ifdef BRAIN_DAMAGE        /* a kludge to get it to work on a mutant
  67.                  * DENIX system */
  68. #undef toupper
  69. #endif
  70.  
  71. /* ---  DO NOT CHANGE ANYTHING BELOW THIS LINE --- */
  72.  
  73. typedef struct fblock_header FBLKHDR;
  74. typedef struct filecache_block FBLOCK;
  75.  
  76. #define FBLOCK_SIZE (256 - sizeof(FBLKHDR))
  77.  
  78. struct fblock_header {
  79.   FBLOCK *nxt;
  80.   int nchars;
  81. };
  82.  
  83. struct filecache_block {
  84.   FBLKHDR hdr;
  85.   char data[FBLOCK_SIZE];
  86. };
  87.  
  88. typedef struct options_table OPTTAB;
  89.  
  90. struct options_table {
  91.   char mud_name[128];
  92.   int port;
  93.   char input_db[256];
  94.   char output_db[256];
  95.   char crash_db[256];    
  96.   char mail_db[256];
  97.   int guest_player;
  98.   int player_start;
  99.   int master_room;
  100.   int idle_timeout;
  101.   int dump_interval;
  102.   int dump_counter;
  103.   int max_logins;
  104.   int paycheck;
  105.   int starting_money;
  106.   int player_queue_limit;
  107.   char money_singular[32];
  108.   char money_plural[32];
  109.   char compress[256];
  110.   char uncompress[256];
  111.   char help_file[256];
  112.   char help_index[256];
  113.   char news_file[256];
  114.   char news_index[256];
  115.   char events_file[256];
  116.   char events_index[256];
  117.   char connect_file[256];
  118.   char motd_file[256];
  119.   char wizmotd_file[256];
  120.   char newuser_file[256];
  121.   char register_file[256];
  122.   char quit_file[256];
  123.   char down_file[256];
  124.   char full_file[256];
  125.   FBLOCK *connect_fcache;
  126.   FBLOCK *motd_fcache;
  127.   FBLOCK *wizmotd_fcache;
  128.   FBLOCK *newuser_fcache;
  129.   FBLOCK *register_fcache;
  130.   FBLOCK *quit_fcache;
  131.   FBLOCK *down_fcache;
  132.   FBLOCK *full_fcache;
  133.   int log_commands;
  134.   int log_huhs;
  135.   int log_forces;
  136.   int log_walls;
  137.   int login_allow;
  138.   int daytime;
  139.   int player_flags;
  140.   int room_flags;
  141.   int exit_flags;
  142.   int thing_flags;
  143.   int player_toggles;
  144.   int room_toggles;
  145.   int exit_toggles;
  146.   int thing_toggles;
  147.   int rwho_interval;
  148.   int rwho_counter;
  149.   int rwho_port;
  150.   char rwho_host[64];
  151.   char rwho_pass[64];
  152. };
  153.  
  154. extern OPTTAB options;
  155.  
  156. #define DUMP_INTERVAL       (options.dump_interval)
  157. #define INACTIVITY_LIMIT    (options.idle_timeout)
  158.  
  159. #ifdef LOGIN_LIMIT
  160. #define MAX_LOGINS      (options.max_logins)
  161. #endif
  162.  
  163. #define  HELPTEXT    (options.help_file)
  164. #define  HELPINDX    (options.help_index)
  165.  
  166. #define  NEWS_FILE      (options.news_file)
  167. #define  NEWSINDX       (options.news_index)
  168.  
  169. #ifdef EVENTS
  170. #define EVENT_FILE            (options.events_file)
  171. #define EVENTINDX             (options.events_index)
  172. #endif
  173.  
  174. /* dbrefs are in the conf file */
  175.  
  176. #ifndef GUEST_RESTRICT
  177. #define Guest(x) (0)
  178. #else
  179. #define GUEST_PLAYER   (options.guest_player)
  180. #define Guest(x) ((x) == GUEST_PLAYER)
  181. #endif
  182.  
  183. #define TINYPORT         (options.port)
  184. #define PLAYER_START     (options.player_start)
  185. #define MASTER_ROOM      (options.master_room)
  186. #define MONEY            (options.money_singular)
  187. #define MONIES           (options.money_plural)
  188.  
  189. #define START_BONUS      (options.starting_money)
  190. #define PAY_CHECK        (options.paycheck)
  191.  
  192. #define QUEUE_QUOTA      (options.player_queue_limit)
  193.  
  194. #define MUDNAME          (options.mud_name)
  195. #define DEF_DB_IN     (options.input_db)
  196. #define DEF_DB_OUT     (options.output_db)
  197.  
  198. #ifdef RWHO_SEND
  199. #define RWHO_INTERVAL    (options.rwho_interval)
  200. #define RWHOSERV         (options.rwho_host)
  201. #define RWHOPORT         (options.rwho_port)
  202. #define RWHOPASS         (options.rwho_pass)
  203. #endif
  204.  
  205. #endif /* __OPTIONS_H */
  206.